package com.fs.cv.dao;

import com.fs.cv.pojo.pojodao.Course;
import com.fs.cv.pojo.pojodao.Teacher;
import com.fs.cv.pojo.pojoview.TeacherInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TeacherInfoDao {


    //通过teacherId找到该教师信息
    Teacher queryTeacherInfoByTeacherId(Integer teacherId);

    //通过courseId查询该课程信息
    Course queryCourseInfoByCourseId(Integer courseId);

    //查询本专业剩余未选课程
    List<Course> querySurplusCourse(Integer userId);

    //查询剩余未选课程
    List<Course> queryAllSurplusCourse();

    //查找老师的所有信息
    List<TeacherInfo> queryAllTeacher(Integer userId);

    //修改老师信息
    Integer editTeacherInfo(Teacher teacher);

    //修改课程的状态
    Integer updateCourseState(@Param("courseId") Integer courseId,@Param("state") Integer state);


    //删除老师(删除老师信息、删除用户信息、删除老师用户关联信息、删除课程被选信息)

    int deletedTeacherByTeacherId(int teacherId);

    int deletedUserTeacherByTeacherId(int teacherId); //真实删除

    int deletedCourseByTeacherId(int teacherId);

    int deletedUserByUserId(int userId);


    //模糊查询所有的信息,str为%str%形势
    List<TeacherInfo> queryPartTeacher(String str);





    //根据用户id查询当前老师信息
    Teacher queryTeacherInfoByUserId(int userId);
}
